#ifndef __LOCAL_MSG_H
#define __LOCAL_MSG_H

#include "list_msg.h"

#define POINT_INFO_MAX    20

typedef struct {
    /* The type of the item, as above. */
    int type;
    /* The item's string, if type==cJSON_String  and type == cJSON_Raw */
    char* valuestring;
    /* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */
    int valueint;
    /* The item's number, if type==cJSON_Number */
    double valuedouble;
} point_info_t;

typedef struct {
    int cnt;
    char name[50];
    point_info_t key_list[POINT_INFO_MAX];
    point_info_t val_list[POINT_INFO_MAX];
} points_info_t;

int local_msg_init(void);
int local_msg_app_info_pub(points_info_t* info);
int local_msg_app_write_pub(points_info_t* info);
int local_mqtt_app_init(char *name);
#endif
